<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"> 

<head></head> 
<body> 
	<ui:composition template="../WEB-INF/layout/template.xhtml">
		<ui:define name="title"><h:outputText value="#{msg.customer_list}"/></ui:define>
		<ui:define name="content">
			<p:fieldset>
				<legend><h:outputText value="#{msg.customer_list}"/></legend>
				<h:form>
					<p:dataTable value="#{visualizzaClientiBean.clienti}" var="cliente">
						<p:column>
							<f:facet name="header">
								<h:outputText value="#{msg.name}"/>				
							</f:facet>
							<h:outputText value="#{cliente.nome}"/>
						</p:column>
						<p:column>
							<f:facet name="header">
								<h:outputText value="#{msg.surname}"/>				
							</f:facet>
							<h:outputText value="#{cliente.cognome}"/>
						</p:column>
						<p:column>
							<f:facet name="header">
								<h:outputText value="#{msg.birth_date}"/>				
							</f:facet>
							<h:outputText value="#{cliente.dataNascita}"/>
						</p:column>
						<p:column>
							<f:facet name="header">
								<h:outputText value="#{msg.actions}"/>				
							</f:facet>
							<h:commandButton action="#{navigationBean.modificaCliente}" value="#{msg.edit}">
								<f:setPropertyActionListener target="#{inserisciClienteBean.clienteInput}" value="#{cliente}"/>
							</h:commandButton>							
						</p:column>
					</p:dataTable>
				</h:form>
			</p:fieldset>
		</ui:define>
	</ui:composition>
</body> 
</html>
